﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Configuration;

namespace Agresso.Interface.Layer.Gateway
{
    public class DataBaseConnectivity
    {
        string m_softmarConnectionString = ConfigurationManager.ConnectionStrings["SOFTMAR_connStr"].ConnectionString;
        string m_agressoConnectionString = ConfigurationManager.ConnectionStrings["AGRESSO_connStr"].ConnectionString;
        string m_interfaceConnectionString = ConfigurationManager.ConnectionStrings["INTERFACE_connStr"].ConnectionString;
        string m_winSDSConnectionString = ConfigurationManager.ConnectionStrings["WINSDS_connStr"].ConnectionString;
        string m_agrTempConnectionString = ConfigurationManager.ConnectionStrings["AGR_TEMP_connStr"].ConnectionString;
        string m_crewPayrollConnectionString = ConfigurationManager.ConnectionStrings["CREW_PAYROLL_connStr"].ConnectionString;
        string m_crewPayrollStagingConnectionString = ConfigurationManager.ConnectionStrings["CREW_PAYROLL_STAGING_connStr"].ConnectionString;
        SqlConnection m_softmarSQLConnection;
        SqlConnection m_softmarSQLConnection_b;
        SqlConnection m_agressoSQLConnection;
        SqlConnection m_interfaceSQLConnection;
        SqlConnection m_interfaceSQLConnection_b;
        SqlConnection m_interfaceSQLConnection_c;
        SqlConnection m_winSDSSQLConnection;
        SqlConnection m_winSDSSQLConnection_b;
        SqlConnection m_agrTempConnectionSQLConnection;
        SqlConnection m_crewPayrollSQLConnection;
        SqlConnection m_crewPayrollStagingSQLConnection;

        public DataBaseConnectivity()
        {
            m_softmarSQLConnection = new SqlConnection(m_softmarConnectionString);
            m_softmarSQLConnection_b = new SqlConnection(m_softmarConnectionString);
            m_agressoSQLConnection = new SqlConnection(m_agressoConnectionString);
            m_interfaceSQLConnection = new SqlConnection(m_interfaceConnectionString);
            m_interfaceSQLConnection_b = new SqlConnection(m_interfaceConnectionString);
            m_interfaceSQLConnection_c = new SqlConnection(m_interfaceConnectionString);
            m_winSDSSQLConnection = new SqlConnection(m_winSDSConnectionString);
            m_winSDSSQLConnection_b = new SqlConnection(m_winSDSConnectionString);
            m_agrTempConnectionSQLConnection = new SqlConnection(m_agrTempConnectionString);
            m_crewPayrollSQLConnection = new SqlConnection(m_crewPayrollConnectionString);
            m_crewPayrollStagingSQLConnection = new SqlConnection(m_crewPayrollStagingConnectionString);
        }
        public SqlConnection SoftmarSqlConnection
        {
            get { return m_softmarSQLConnection; }
        }
        public SqlConnection SoftmarSqlConnection_b
        {
            get { return m_softmarSQLConnection_b; }
        }
        public SqlConnection AgressoSqlConnection
        {
            get { return m_agressoSQLConnection; }
        }
        public SqlConnection InterfaceSqlConnection
        {
            get { return m_interfaceSQLConnection; }
        }
        public SqlConnection InterfaceSqlConnection_b
        {
            get { return m_interfaceSQLConnection_b; }
        }
        public SqlConnection InterfaceSqlConnection_c
        {
            get { return m_interfaceSQLConnection_c; }
        }
        public SqlConnection WinSDSSqlConnection
        {
            get { return m_winSDSSQLConnection; }
        }
        public SqlConnection WinSDSSqlConnection_b
        {
            get { return m_winSDSSQLConnection_b; }
        }
        public SqlConnection AgrTempConnectionSQLConnection
        {
            get { return m_agrTempConnectionSQLConnection; }
        }
        public SqlConnection CrewPayrollSqlConnection
        {
            get { return m_crewPayrollSQLConnection; }
        }
        public SqlConnection CrewPayrollStagingSqlConnection
        {
            get { return m_crewPayrollStagingSQLConnection; }
        }
    }
}
